package com.yjd.msg.comm.service;

import com.yjd.comm.base.service.IBaseService;
import com.yjd.comm.msg.MnsMsgInfo;
import com.yjd.msg.comm.enums.MsgStatusEnum;
import com.yjd.msg.comm.model.MsgInfoModel;

import java.util.List;
import java.util.Map;

/**
 * <b>description</b>：消息记录表业务接口<br>
 * <b>time</b>：2018-01-19 11:51:35 <br>
 * <b>author</b>：  carl
 */
public interface IMsgInfoService extends IBaseService {
	/**
	 * 插入
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public MsgInfoModel insert(MsgInfoModel model) throws Exception;

	/**
	 * 更新,大于等于1表示成功，其他失败
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public int update(MsgInfoModel model) throws Exception;

	/**
	 * 根据id删除,大于等于1表示成功，其他失败
	 * 
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public int delete(long id) throws Exception;

	public int updateByMap(Map param)throws Exception;

	/**
	 * 完成消息处理
	 * @param model
	 * @throws Exception
	 */
	public void finished(MnsMsgInfo model, MsgStatusEnum msgStatusEnum)throws Exception;

	/**
	 * 补偿发送消息
	 * @param msg_id
	 * @throws Exception
	 */
	public void sendMessage(Long msg_id)throws Exception;

	/**
	 * 将数据移到历史表
	 * @param msgIds
	 * @throws Exception
	 */
	public void moveMsgHistory(List<Long> msgIds)throws Exception;


	/**
	 * 手动处理消息服务
	 * @param msg_id
	 * @throws Exception
	 */
	public void msgBusinessDispose(Long msg_id)throws Exception;
}
